package com.sxt.server.common.model;

import io.netty.buffer.ByteBuf;

public class Jt808Msg {
	/**
	 * 消息头 12byte
	 */
	private MsgHeader msgHeader;

	/**
	 * 消息体ByteBuf(方便后期采用ByteBuf计算)
	 */
	private ByteBuf msgBodyByteBuf;
	/**
	 * 消息体字节数组
	 */
	private byte[] msgBodyBytes;
	
	/**
	 * 消息体
	 */
	private ByteBuf msgByteBuf;
	/**
	 * 校验码 1byte
	 */
	private int checkSum;

	// TODO set 和 get 方法
	public MsgHeader getMsgHeader() {
		return msgHeader;
	}

	public void setMsgHeader(MsgHeader msgHeader) {
		this.msgHeader = msgHeader;
	}

	public ByteBuf getMsgByteBuf() {
		return msgByteBuf;
	}

	public void setMsgByteBuf(ByteBuf msgByteBuf) {
		this.msgByteBuf = msgByteBuf;
	}

	public int getCheckSum() {
		return checkSum;
	}

	public void setCheckSum(int checkSum) {
		this.checkSum = checkSum;
	}

	public byte[] getMsgBodyBytes() {
		return msgBodyBytes;
	}

	public void setMsgBodyBytes(byte[] msgBodyBytes) {
		this.msgBodyBytes = msgBodyBytes;
	}
//	public BitConverter getBitConverter() {
//		return bitConverter;
//	}
//
//	public void setBitConverter(BitConverter bitConverter) {
//		this.bitConverter = bitConverter;
//	}
	public ByteBuf getMsgBodyByteBuf() {
		return msgBodyByteBuf;
	}

	public void setMsgBodyByteBuf(ByteBuf msgBodyByteBuf) {
		this.msgBodyByteBuf = msgBodyByteBuf;
	}

	@Override
	public String toString() {
		return "Jt808Msg [checkSum=" + checkSum + "]";
	}
	
}
